package com.mywang.weitravel.modules.manbushanghai;

import android.content.Intent;
import android.widget.ImageView;
import android.widget.TextView;

import com.mywang.weitravel.R;
import com.mywang.weitravel.base.BaseActivity;
import com.mywang.weitravel.base.BaseContract;

import butterknife.BindView;
import butterknife.OnClick;

public class WebViewActivity extends BaseActivity {

    @BindView(R.id.iv_title_back)
    ImageView ivTitleBack;
    @BindView(R.id.tv_title)
    TextView tvTitle;
    @BindView(R.id.webview)
    X5WebView webview;

    public static final String NAME_URL = "URL";
    public static final String TITLE_NAME = "NAME";
    private String url;
    private String title;

    @Override
    protected void initView() {
        Intent intent = getIntent();
        tvTitle.setText(intent.getStringExtra(TITLE_NAME));
        webview.loadUrl(intent.getStringExtra(NAME_URL));
    }

    @Override
    protected BaseContract.IPresenter initPresenter() {
        return null;
    }

    @Override
    protected int getActivityLayoutID() {
        return R.layout.activity_webview;
    }


    @OnClick(R.id.iv_title_back)
    public void onViewClicked() {
        finish();
    }

}
